﻿@model GraduateManagement.Models.replyStudentViewModel
@{
    ViewBag.Title = "学生详细信息";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>

<div>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.stuAccountNum)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.stuAccountNum)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.stuname)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.stuname)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.progressName)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.progressName)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.score)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.score)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.attachmentAddr)
        </dt>
        @if (Model.progress < 4)
        {
            <dd>
                导师未审核通过
            </dd>
        }
        else if (Model.progress == 4 && Model.myScore == null)
        {
            string fileName = Model.attachmentName;
            <dd>
                <a href=@Model.attachmentAddr>@fileName</a>
            </dd>
            using (Html.BeginForm("DoneReply", "Teachers", new { id = Model.stuID }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
            {
                <div class="form-group">
                    <div class="col-md-2">
                        <input type="text" name="myScore" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" class="btn btn-primary" value="确认" />
                    </div>
                </div>
            }
        }
        else if (Model.progress >= 4 || Model.myScore != null)
        {
            string fileName = Model.attachmentName;
            <dd>
                <a href=@Model.attachmentAddr>@fileName</a>
            </dd>
            <fieldset disabled>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <button type="submit" class="btn btn-primary" value="已审核" />
                    </div>
                </div>
            </fieldset>
        }
    </dl>
</div>

